<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import= "java.util.*"%>
<%@ page import= "dto.PagoDTO"%>
<html>
<head>
	<link rel="stylesheet" href="css/estilo.css" type="text/css">
	<title>Lista de Pagos</title>
</head>
<body>

<table cellspacing="3" cellpadding="3" border="1" width="500">
	<tr>
		<td colspan="4"><b>Lista de Pagos</b></td>
	</tr>
	<tr>
		<td><b>Id</b></td>
		<td><b>Tipo Pago</b></td>
		<td><b>Tickets</b></td>
		<td><b>Billetes</b></td>
		<td><b>Factura</b></td>
	</tr>
<%
	PagoDTO aux;
	int id; 	
	List<PagoDTO> pagos = (List<PagoDTO>)request.getAttribute("pagos");
	for(Iterator<PagoDTO> i = pagos.iterator(); i.hasNext();)
	{
		aux = i.next();
		id = aux.getId();
%>
	<tr>
		<td><%=id%></td>
		<td><%=aux.getTipoPago()%></td>
		<%if(aux.getTicket()!=null){ 	%>
		<td><a href="Controlador?action=MostrarTicketsPago&id=<%=id%>">Mostrar</a></td>		
		<%} else{%>	
		<td>No tiene</td>		
		<%}
		if(!aux.getEfectivo().isEmpty()){%>
		<td><a href="Controlador?action=MostrarItemsBilletePago&id=<%=id%>">Mostrar</a></td>
		<%} else{%>	
		<td>No tiene</td>		
		<%}%>
		<td><a href="Controlador?action=MostrarFacturasPago&id=<%=id%>">Mostrar</a></td>				
	</tr>
<% } %>
</table>
</body>
</html>